package com.rongc.client.freight.business.mine.buz;

import android.content.Context;

import com.rongc.client.freight.R;
import com.rongc.client.freight.base.model.BaseDic;
import com.rongc.client.freight.base.view.widget.CJRow.ARResponse;
import com.rongc.client.freight.utils.dic.impl.Field;
import com.rongc.client.freight.utils.dic.impl.FieldConstant;
import com.rongc.client.freight.utils.dic.impl.Table;

/**
 * Created by ccqx on 2017/7/1.
 */

public class CarBuz {
    public static Table getCarTable(Context context) {

        Table table = new Table();
        table.addField(new Field("address", context.getResources().getString(R.string.car_create_address), 1, FieldConstant.SHOWTYPE_JUMP_ACTIVITY,FieldConstant.INPUTTYPE_LONG_DATE,FieldConstant.EDIT_MODE,FieldConstant.INPUTSTYLE_DATATIMESTYLE));
        table.addField(new Field("plateno", context.getResources().getString(R.string.car_create_plateno), 2, FieldConstant.SHOWTYPE_NO_CLICK,FieldConstant.INPUTTYPE_SINGLE,FieldConstant.EDIT_MODE,FieldConstant.INPUTSTYLE_TEXTSTYLE));
        table.addField(new Field("carLength", context.getResources().getString(R.string.car_create_carLength), 3, FieldConstant.SHOWTYPE_JUMP_ACTIVITY,FieldConstant.INPUTTYPE_LONG_DATE,FieldConstant.EDIT_MODE,FieldConstant.INPUTSTYLE_DATATIMESTYLE));
        table.addField(new Field("carModels", context.getResources().getString(R.string.car_create_carModels), 4, FieldConstant.SHOWTYPE_JUMP_ACTIVITY,FieldConstant.INPUTTYPE_LONG_DATE,FieldConstant.EDIT_MODE,FieldConstant.INPUTSTYLE_DATATIMESTYLE));
        table.addField(new Field("carLoad", context.getResources().getString(R.string.car_create_carLoad), 5, FieldConstant.SHOWTYPE_NO_CLICK,FieldConstant.INPUTTYPE_SINGLE,FieldConstant.EDIT_MODE,FieldConstant.INPUTSTYLE_NUMBERSTYLE));
        table.addField(new Field("dulk", context.getResources().getString(R.string.car_create_volume), 6, FieldConstant.SHOWTYPE_NO_CLICK,FieldConstant.INPUTTYPE_SINGLE,FieldConstant.EDIT_MODE,FieldConstant.INPUTSTYLE_NUMBERSTYLE));
        table.addField(new Field("photo", context.getResources().getString(R.string.car_create_photo), 7, FieldConstant.SHOWTYPE_JUMP_ACTIVITY,FieldConstant.INPUTTYPE_LONG_DATE,FieldConstant.EDIT_MODE,FieldConstant.INPUTSTYLE_TEXTSTYLE));


        table.addField(new Field("userId", 8,false));

        table.getField("carLength").setFunctionNo(BaseDic.DicsType.LENGTH_TYPE);
        table.getField("carModels").setFunctionNo(BaseDic.DicsType.MODEL_TYPE);
        return table;
    }

    public static ARResponse getMockBaseResponse(){
        String str = "{\"data\":{\"address\":\"\",\"plateno\":\"\"," +
                "\"carLength\":\"\",\"carModel\":\"\",\"carLoad\":\"\",\"dulk\":\"\",\"photo\":\"\"}}";
        return new ARResponse(str);
    }

}
